﻿
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title>
<meta name="keywords" content="{$SEO['keyword']}">
<meta name="description" content="{$SEO['description']}">
<link href="{THEME_STYLE_PATH}style/css/admode_new.css" type="text/css" rel="stylesheet" />
<script src="{THEME_STYLE_PATH}style/js/jquery.min.js"></script>
<script src="{THEME_STYLE_PATH}style/js/core.js"></script>
<!--[if IE 6]>
<script src="/js/DD_belatedPNG.js"></script>
<script>
  DD_belatedPNG.fix('*');
</script>
<![endif]-->
<!--[if IE 6]>
<style type="text/css">
    html{overflow:hidden;}
    body{height:100%;overflow:auto;}
</style>
<![endif]-->
</head>
<body style="background:url({$backgroud}) no-repeat top center #fff"><!--设置背景图-->
<?php $userinfo = getuserinfo();?>
<div class="Topbox">
	<div class="Topbanner">
		<div class="tb_l">
		<a href="{__APP__}"><img src="{THEME_STYLE_PATH}style/images/slogo.png" style="vertical-align:-6px;" /></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="{__APP__}" target="_blank">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;
		{pc:document action="category" catid="0" num="6"}
			{loop $data $r}
			<a href="{$r[url]}" class="{if $catid == $r['catid'] || $r['catid'] == $top_parentid}Navon{else}Navun{/if}"><span>{$r[catname]}</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
			{/loop}
		{/pc}			
		</div>
		<div class="tb_r">
			{if $userinfo}
				您好，<a href="{U('Member/Profile/Index')}" target="_blank"><?php echo $userinfo['nickname'];?></a>
			{else}
				<a href="{U('Member/Index/login', array('refresh' => __SELF__))}" target="_blank">[登录]</a>&nbsp;&nbsp;&nbsp;
				<a href="{U('Member/Index/register', array('refresh' => __SELF__))}" target="_blank">[注册]</a>
			{/if}
		</div>			
		<div class="clear"></div>
	</div>
</div>

<div class="zwf"></div>
<div class="Adstep"><div class="govd"><a href="#">查看试玩视频教程</a></div><a href="{$task_url}" class="regid" target="_blank"></a></div>
<div class="Admain">
	<div class="Admain_left">
	<!--我的试玩-->
	<div class="Mysw">
		<div class="Mysw_title"></div>
		<div class="Mysw_text">
		{if !$userinfo}
			<p style="margin-bottom:4px; margin-top:4px;">您还未登录及时赚,请登录后进行试玩平台</p>
			<p style="margin-bottom:4px;"><a href="{U('Member/Index/login', array('refresh' => __SELF__))}" class="sreglink">[登录]</a>&nbsp;<a href="{U('Member/Index/register', array('refresh' => __SELF__))}" class="sreglink">[注册]</a></p>
		{else}
			<p style="margin-bottom:4px; line-height:18px;">您还未<a href="/jump.php?adID=2351" class="sreglink">注册</a>{$title}，请先注册试玩，再回此页刷新，确认您的试玩账号</p>
			<p class="sx"><a href="javascript:void(0);" onclick="location.reload();">刷新本页</a></p>
<script type="text/javascript">
var a = true;
function doSureRemark(){
	if(a){
		a=false;
		var remarkC = $("#remarkC").val();
		if(remarkC ==""){
			a = true;
			alert("请填写备注");return;
		}
		$.ajax({
			url:"/cpaModel.php",
			type:"post",
			data:{act:"remark",adID:2351,remark:remarkC},
			dataType:"json",
			error:function(){
				alert('请求已经提交，请稍等~');
			},
			success:function(data){
				a = true;
				juxiangyou.core.func.hidePopupDiv($('#jxy_pop_popSys1'));
				popup._reload=true;
				popup.prompt(data.returnMsg);
				return;
				
			}
		});
	}
}
$(document).ready(function(){
	$("#remark").live("click",function(){
		var _html = '<p><textarea name="" cols="" rows="" id="remarkC" class="bzipt"></textarea></p>';
			_html += "<p style='font-size:12px;'>该功能用于您记录试玩信息，为了安全请勿录入密码等信息。</p>";
			_html +='<p class="btn"><a class="public_w_btn_y" onclick="doSureRemark()" href="javascript:void(0);">确认</a>&nbsp;&nbsp;<a class="public_w_btn_y" onclick="juxiangyou.core.func.hidePopupDiv($(\'#jxy_pop_popSys1\'));" href="javascript:void(0);">取消</a></p>';
		popup.popSys1("游戏备注",_html,"400");
	})
});
</script>
		{/if}
		</div>
	</div>
	<!--我的试玩-->
	<!--公告-->
	{pc:document action="lists" catid="21" num="5" order="listorder DESC"}
	<div class="Swgg">
		<div class="Swgg_title"><label><a href="{U('document/index/lists',array('catid'=>21))}">更多</a></label></div>
		<div class="Swgg_text">
			<ul>
			{loop $data $v}
				<li><a href="{$d[url]}"  target="_blank">{$v[title]}</a></li>
			{/loop}
			
			</ul>
		</div>
	</div>
	{/pc}
	<!--公告-->

	<!--倒计时-->
	<div class="Addjs">
		<div class="Addjs_title"></div>
		<input type="hidden" id="times" value="<?php echo strtotime(str_replace("AM",'',$end_time))-strtotime(date( "Y-m-d H:i:s",time ()));?>"/>
		<div class="Addjs_text" id="timestr"></div>
	</div>
	<!--倒计时-->
	<!--试玩排名-->
	<div class="Swlvlist">
		<div class="Swlvlist_title"></div>						
		<div class="Swlvlist_text">
			<table width="267" border="0" cellpadding="0" cellspacing="1" bgcolor="#3b3b3b" class="lvtd" id="tbLevelSort">
				
			</table>
			<div class="lv_page"><a href="javascript:void(0);" id="prev">上一页</a>&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" id="next">下一页</a></div>
			<div style="padding-top:10px; margin-top:10px; border-top:1px dashed #4c4c4c;" class="da3">注：试玩等级排行数据每10分钟更新。</div>
		</div>
	</div>
	<!--试玩排名-->

	<!--会员群-->
	<div class="QQQjs">
		<div class="QQQjs_title"></div>
		<div class="QQQjs_text">及时赚超级会员群:383949875&nbsp;<a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=bb4a16b6b3a59fe1f429fd0a1471dd22296f9014a51454ec29e213b6a7cd6c95"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="及时赚超级会员群" title="及时赚超级会员群" style="vertical-align:-5px;"></a></div>
	</div>
	<!--会员群-->

	<div class="JJjs">
		<div class="JJjs_title"></div>
		<div class="JJjs_text">{$game_content}</div>
	</div>
</div>

<div class="Admain_right">
	<!--试玩信息-->
	{if $test_info}
	<div class="Swinfo">{$test_info}</div>
	{/if}
	<!--试玩信息-->
	<div style=" width:633px; padding:0 10px; border:1px solid #ae8700; background:#ffeaa1; margin-bottom:10px; line-height:28px; color:#e40000; font-weight:bold;">温馨提示：严禁在商家平台、QQ群等渠道，发布与及时赚有关言论。如有违规，直接冻结账号！</div>
	<!--试玩奖励-->
	<div class="SWjs">
		<div class="SWjs_title"></div>
		<div class="SWjs_text">
			{if $reward_config}
			<table width="614" border="0" cellpadding="0" cellspacing="1" bgcolor="#aba99a" class="Jltab">
				<tr>
					<td bgcolor="#e1e0dd" class="title a1">步骤</td>
					<td bgcolor="#e1e0dd" class="title a2">等级</td>
					<td bgcolor="#e1e0dd" class="title a3">奖励{type_change()}币</td>
					<td bgcolor="#e1e0dd" class="title a4">领奖</td>
					<td bgcolor="#e1e0dd" class="title a1">步骤</td>
					<td bgcolor="#e1e0dd" class="title a2">等级</td>
					<td bgcolor="#e1e0dd" class="title a3">奖励{type_change()}币</td>
					<td bgcolor="#e1e0dd" class="title a4">领奖</td>
				</tr>
				<tr>
				<?php $n = 1; ?>
				<?php foreach ($reward_config as $rank => $number): ?>
					<td bgcolor="#e1e0dd" class="a1">{$n}</td>
					<td bgcolor="#e1e0dd" class="a2">{$rank}级</td>
					<td bgcolor="#e1e0dd" class="a3"><span class="ofe">{$number}</span><img src="{THEME_STYLE_PATH}style/images/ub.gif" /></td>
					<td bgcolor="#e1e0dd" class="a4" id="jxy_td_award{$rank}">未达到</td>
					{if ($n % 2 == 0)}</tr><tr>{/if}									
				<?php $n++;endforeach;unset($n); ?>
				<tr>
			  <tr>
				<td colspan="8" bgcolor="#e1e0dd" style="color:#4a4a4a;">注:每获得一次试玩{type_change()}币奖励都可获得一定的U点，U点越多随之VIP等级越高！</td>
			  </tr>
			</table>
			{/if}
			<?php $_where = "title LIKE %'.$title.'%"; ?>
			{pc:document action="lists" catid="24" num="1" where="$_where"}
			{loop $data $r}
			<div class="swbd">
				<h1>试玩速成宝典</h1>
				<ul>
					<li class="a1">{$r[title]}&nbsp;</li>
					<li class="txt">{$r[description]}...<a href="{$r[url]}" target="_blank">[查看全部]</a></li>
				</ul>
			</div>
			{/loop}
			{/pc}
		</div>
	</div>
	<!--试玩奖励-->
	<!--冲级赛-->
	{if $competition}
	<div class="CJS">
		<div class="CJS_title"></div>
		<div class="CJS_text">{$competition}</div>
	</div>
	{/if}
	<!--冲级赛-->
	<!--试玩截图-->
	{if $testimages}
	<div class="JTjs">
		<div class="JTjs_title"></div>
		<div class="JTjs_text">
			<ul>
			<?php  foreach($testimages as  $v){?>
				<li {if $v == $testimages[3]} class="last"{/if}><img src="{$v[url]}" align="{$v[alt]}" width="140" height="103" /></li>
			<?php }?>	
			</ul>
		</div>
	</div>
	{/if}
	<!--试玩截图-->
	{if $rebate_content}
	<div class="CZFL">
		<div class="CZFL_title"></div>
		<div class="CZFL_text">{$rebate_content}</div>
	</div>
	{/if}

	<!--试玩条例-->
	<div class="TLjs">
		<div class="TLjs_title"></div>
		<div class="TLjs_text"><p>*在体验过程中如有以下违规行为，将得不到{type_change()}币奖励，严重者直接冻结帐号：<br>1.创建试玩账号昵称、角色名、公会或联盟名称不得跟及时赚内容相关。<br>2.严禁在试玩平台里发表任何有关及时赚的话题，如“{type_change()}币奖励、毕业、走人”等。<br>3.不要在试玩平台里发表诋毁商家试玩的言论，如“垃圾试玩、试玩太烂、拿完奖励不玩了”等。<br>4.为了快速获取Z币奖励，使用第三方软件试玩平台。<br>5.严禁注册多个及时赚账号试玩平台或体验广告以非法获取U币奖励。<br>6.严禁在试玩平台的同时还帮助其他会员代玩同一款试玩。<br>7.不要在试玩平台里推荐其他玩家加入及时赚，以免对合作商家造成影响。<br></p></div>
	</div>
	<!--试玩条例-->
</div>

<div class="clear"></div>
</div>
<div class="bottomline"><img src="{THEME_STYLE_PATH}style/images/bottomline.jpg" /></div>
<!--尾部-->
{include template('footer','common')}
<!--尾部-->
</body>
</html>
<script type="text/javascript" src="{THEME_STYLE_PATH}style/js/ZeroClipboard.min.js"></script>
<script type="text/javascript">
var page = 1;var totalPage = 1;
var gameLevelArr = {"lev0":{"level":1,"userName":"诸葛望西","userLevel":"28"},"lev1":{"level":2,"userName":"乏味、","userLevel":"28"},"lev2":{"level":3,"userName":"摘星","userLevel":"27"},"lev3":{"level":4,"userName":"钱莲婷","userLevel":"27"},"lev4":{"level":5,"userName":"姚始腾","userLevel":"27"},"lev5":{"level":6,"userName":"梅诗倩","userLevel":"27"},"lev6":{"level":7,"userName":"庞尧舞","userLevel":"27"},"lev7":{"level":8,"userName":"杜文天","userLevel":"27"},"lev8":{"level":9,"userName":"赵叔圣","userLevel":"27"},"lev9":{"level":10,"userName":"深知你是梦","userLevel":"26"}};
$('#prev').click(function(){
	if(page>1){page--; showLevel(page);}
});
$('#next').click(function(){
	if(page<totalPage){page++; showLevel(page);}
});
function showLevel(p)
{
	if(p<1) return true;
	else if(p>totalPage) return true;
	
	var ob = (p-1)*10;
	var oe = p*10;

	var tbLevelSort = $('#tbLevelSort');
	var _html = '<tr><td bgcolor="#333333" class="title a3">排名</td><td bgcolor="#333333" class="title a1">试玩角色名</td><td bgcolor="#333333" class="title a2">试玩等级</td></tr>';


	for(var i=ob;i<oe;i++){
		var obj = eval("gameLevelArr.lev"+i);
		_html+='<tr><td  bgcolor="#333333" class="a3" >'+obj.level+'</td><td bgcolor="#333333" class="a1">'+obj.userName+'</td><td bgcolor="#333333" class="a2">Lv.'+obj.userLevel+'</td></tr>';
	}
	tbLevelSort.html(_html);
	if(p==1 && totalPage==1){$('#prev').hide();$('#next').hide();}
	else if(p==1){$('#prev').hide();}
	else if(p==totalPage){$('#next').hide();}
	else{$('#prev').show();$('#next').show();}
}
var isLimit = true;var time = $.trim($('#times').val());;var adID = 2351; 

$(document).ready(function(){
	popup.popGameTip("温馨提示","<p style='text-indent: 2em;text-align:left;'>严禁在<strong style='color:#e10000;'>商家游戏平台</strong>内，发表任何与及时赚有关的话题，如：</p><p style='text-indent: 2em;text-align:left;'><strong style='color:#e10000;'>推荐好友、及时赚{type_change()}币奖励、毕业、走人！</p><p style='text-indent: 2em;text-align:left;'>若有违规，永久锁定账号，永不解封！</strong>举报有奖！</p>",500);
	timeLimit(time);
	showLevel(1);
	$('.regid').click(function(){
		if(0 == 1){
			popup.popGameTip("请先下载...",'<span>试玩将于正式开启，请提前下载客户端，待试玩开启后，再进行注册试玩。</span><br /><a target="_blank" href=""><strong style="color:#6ad600;">点我立即下载</strong></a>',400);
		}else{
			popup.popGameTip("注册进行中...","您正在注册<strong style='color:#e10000;'>仙侠道88服</strong>试玩<br>完成注册后请在<strong style='color:#e10000;'>“我的试玩”</strong>查看绑定信息<br><button onclick='document.location.reload();' style='padding: 0 5px;font-size: 16px;font-family:\"微软雅黑\",\"黑体\"'>已完成注册</button>&nbsp;&nbsp;<button onclick='juxiangyou.core.func.hidePopupDiv($(\"#jxy_pop_gametip\"));' style='padding: 0 5px;font-size: 16px;font-family:\"微软雅黑\",\"黑体\"'>还未完成注册</button><br>",400);
		}
	});
	
	});


function timeLimit(time){
	if(time>0){
		var d = Math.floor(time/86400);
		var h = Math.floor((time%86400)/3600);
		var m = Math.floor((time%3600)/60);
		var s = Math.floor(time%60);  
		var msg = '';
		if(s<10){s = '0'+s;}
		s = String(s);
		s1 = s.substr(0,1);
		s2 = s.substr(1,1);
		msg +='<span>'+d+'</span>&nbsp;天&nbsp;&nbsp;<span>'+h+'</span>&nbsp;时&nbsp;&nbsp;<span>'+m+'</span>分&nbsp;&nbsp;<span>'+s+'</span>秒';
		--time;
		setTimeout("timeLimit("+time+")",1000);
	}else{      
		msg = '已经结束';
	}
	document.getElementById("timestr").innerHTML = msg;
}


/* 领取{type_change()}币奖励函数 */
function awardGames(step) {
	$.ajax({
		type:'POST',
		url:"{U('Member/Game/award')}",
		data:{"step":step,"adID":adID},
		dataType:'json',
		error:function(){
			alert('请求已经提交，请稍等~');
		},
		success:function(rst){
			if(rst.error==10000){
				popup._reload = true;
				popup.awardGames(rst.gold,rst.score);
			}else{
				popup.prompt(rst.msg);
			}
		}

	});	
}

/* 更新账户绑定信息 */
function update(id){
	var refresh = '<img src="{THEME_STYLE_PATH}style/images/sxxx.gif">';
	var loading = '<img src="{THEME_STYLE_PATH}style/images/sxz.gif">';
	$('#updateID').html(loading);
	$.ajax({
		type:'POST',
		url:'/cpaModel.php',
		timeout: 5000,
		data:{"act":'update',"id":id},
		dataType:'json',
		error:function(){
			popup.prompt("数据更新存在延迟，请刷新再试！");$('#updateID').html(refresh);
		},
		success:function(rst){
			if(rst.error==10000){
				var _html = '';
				var playInfo = $('#playInfo');
				if(rst.asseccArr.idCode) _html+='绑定参数：<span>'+rst.asseccArr.idCode+'</span><br>';
				if(rst.asseccArr.userName) _html+='账号：<span>'+rst.asseccArr.userName+'</span><br>';
				if(rst.asseccArr.userRole) _html+='角色名：<span>'+rst.asseccArr.userRole+'</span><br>';
				if(rst.asseccArr.userLevel) _html+='当前'+rst.asseccArr.adUnit+'：'+rst.asseccArr.userLevel+'</span><br>';
				if(rst.asseccArr.serverName) _html+='区服信息：<span>'+rst.asseccArr.serverName+'</span><br>';
				if(rst.asseccArr.forshowTime) _html+='<label class="da3">最新更新时间：'+rst.asseccArr.forshowTime+'</label>';
				_html+='<span class="sx"><a href="javascript:void(0);" onclick="update('+id+')" id="updateID"><img src="/images/admode/sxxx.gif" style="margin-top:4px;" /></a>&nbsp;&nbsp;<a href="javascript:void(0)" id="remark" class="bzlink">添加备注</a></span><br>';
				if(_html) playInfo.html(_html);
				$('#updateID').html(refresh);
				if(rst.asseccArr.playStep > rst.asseccArr.awardStep){
					for(var i = rst.asseccArr.awardStep*1+1;i<=rst.asseccArr.playStep;i++){
						var tbObj = $('#jxy_td_award'+i);var awardBtn = '<a href="javascript:void(0);" onclick="awardGames('+i+')"></a>';
						if(tbObj.html()=='未达到'){
							tbObj.html(awardBtn);
						}
					}
				}
			}else{
				popup.prompt(rst.msg);
			}
		}
	});
}
</script>